package com.kingstar.ceres.entity.secondary;


import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Tolerate;

import java.util.Date;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * XSWAP成交行情表
 *
 * @author 傻男人
 * @since 2022-03-30
 */

@Data
@ToString(callSuper = true)
@TableName(value = "k_cmds_xswap_market_deal")
@Builder
public class KCmdsXswapMarketDeal implements Serializable {

    private static final long serialVersionUID = 1L;

    @Tolerate
    public KCmdsXswapMarketDeal() {
    }

    /**
     * 债券代码
     */
	@TableField("security_id")
	private String securityId;
    /**
     * 行情更新时间
     */
	@TableField("transact_time")
	private String transactTime;
    /**
     * 行情类型
     */
	@TableField("md_type")
	private String mdType;
    /**
     * 详细行情类型
     */
	@TableField("md_sub_type")
	private String mdSubType;
    /**
     * 市场标识
     */
	@TableField("market_indicator")
	private String marketIndicator;
    /**
     * 交易方式
     */
	@TableField("trade_method")
	private String tradeMethod;
    /**
     * 2 表示最新利率
     */
	@TableField("last_all_in_dealt_rate")
	private BigDecimal lastAllInDealtRate;
    /**
     * 最新成交量
     */
	@TableField("trade_volume")
	private Long tradeVolume;
    /**
     * 开盘利率
     */
	@TableField("opening_price")
	private BigDecimal openingPrice;
    /**
     * 8 表示最低利率
     */
	@TableField("trading_session_low_dealt_price")
	private BigDecimal tradingSessionLowDealtPrice;
    /**
     * 7 表示最高利率
     */
	@TableField("trading_session_high_dealt_price")
	private BigDecimal tradingSessionHighDealtPrice;
    /**
     * z 表示盘中参考价
     */
	@TableField("session_reference_price")
	private BigDecimal sessionReferencePrice;
    /**
     * B 表示当日累计成交量
     */
	@TableField("deal_size_of_day")
	private Long dealSizeOfDay;
    /**
     * 创建时间
     */
	@TableField(value = "create_time", fill = FieldFill.INSERT)
	private Long createTime;
    /**
     * 来源
     */
	@TableField("message_source")
	private String messageSource;
    /**
     * 成交日期
     */
	@TableField("trade_date")
	private String tradeDate;
    /**
     * 成交时间
     */
	@TableField("trade_time")
	private String tradeTime;
    /**
     * 成交时间（时间戳）
     */
	@TableField("quotation_time")
	private Long quotationTime;

	public class Meta {
        public static final String SECURITY_ID = "security_id";
        public static final String TRANSACT_TIME = "transact_time";
        public static final String MD_TYPE = "md_type";
        public static final String MD_SUB_TYPE = "md_sub_type";
        public static final String MARKET_INDICATOR = "market_indicator";
        public static final String TRADE_METHOD = "trade_method";
        public static final String LAST_ALL_IN_DEALT_RATE = "last_all_in_dealt_rate";
        public static final String TRADE_VOLUME = "trade_volume";
        public static final String OPENING_PRICE = "opening_price";
        public static final String TRADING_SESSION_LOW_DEALT_PRICE = "trading_session_low_dealt_price";
        public static final String TRADING_SESSION_HIGH_DEALT_PRICE = "trading_session_high_dealt_price";
        public static final String SESSION_REFERENCE_PRICE = "session_reference_price";
        public static final String DEAL_SIZE_OF_DAY = "deal_size_of_day";
        public static final String CREATE_TIME = "create_time";
        public static final String MESSAGE_SOURCE = "message_source";
        public static final String TRADE_DATE = "trade_date";
        public static final String TRADE_TIME = "trade_time";
        public static final String QUOTATION_TIME = "quotation_time";
    }
}